package com.jetgege.convenientbox.Base;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by jetgege on 2017/3/11.
 */
 public abstract class BaseActivity extends AppCompatActivity {


    protected abstract int getLayoutId();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());
        ActivityCollector.addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityCollector.removeActivity(this);
    }
}